package com.danco.training.hoteladmin.controls;



import java.util.ArrayList;
import java.util.Collections;
import com.danco.training.hoteladmin.core.*;
import com.danco.training.hoteladmin.storage.*;
import com.danco.training.hoteladmin.services.*;

 class Main {

	public static void main(String[] args) {
		String str1 = "src/com/danco/training/hoteladmin/core/Clients.txt";
		String str2 = "src/com/danco/training/hoteladmin/core/Rooms.txt";
		ClientService cs=new ClientService();
		RoomService   rs=new RoomService();
		ArrayList<Client> clientarr=cs.clientsReadFromFile(str1);
		ArrayList<Room> roomarr=rs.roomsReadFromFile(str2);		
		roomarr.get(1).showRoomInfo();
		cs.showClientArray();
		rs.showRoomArray();			
		Collections.sort(clientarr, new ClientSortByNames());
		rs.addRoom(new Room(2, 3, 60));
		
		System.out.println(roomarr.get(1).isFree());
		rs.addRoom(new Room(2, 3, 60));
		rs.showRoomArray();
		rs.roomsWriteToFile(str2);
		cs.clientsWriteToFile(str1);
	}		
}
